home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / source / gfxfx / makeset.pas < prev    next >
Pascal/Delphi Source File  |  1994-04-20  |  1KB  |  50 lines

  1.  
  2. program dropcharset;
  3. { Put TheDraw uncrunched Pascal ansi file on screen, and 'unchain' it...
  4.   by Bas van Gaalen, Holland, PD }
  5. uses
  6.   crt,bcrt;
  7.  
  8. type
  9.   scrtype = array[0..7999] of byte;
  10.   storetype = array[0..4,0..320] of word;
  11.  
  12. var
  13.   txtfile : text;
  14.   scraddr : scrtype absolute $b800:$0000;
  15.   chars : storetype;
  16.   v,x : word;
  17.   i,y : byte;
  18.  
  19. {$i charset.inc}
  20.  
  21. begin
  22.   textmode(co80+font8x8);
  23.   ansiwrite(imagedata,scraddr,imagedata_length);
  24.   assign(txtfile,'CHARS.INC');
  25.   rewrite(txtfile);
  26.  
  27.   for i := 0 to 4 do { 5-line hi charset }
  28.     for x := 0 to 79 do begin { 80 small characters on one line }
  29.       for y := 0 to 3 do begin { 4 lines of big characters }
  30.         v := memw[$b800:y*5*160+i*160+x+x];
  31.         memw[$b800:(i*5+20+y)*160+x+x] := v;
  32.         chars[i,y*80+x] := v;
  33.       end;
  34.     end;
  35.  
  36.   writeln(txtfile,'  chars : array[0..4,0..320] of word = (');
  37.   write(txtfile,'    ');
  38.   for y := 0 to 4 do begin { 5-line hi charset }
  39.     for x := 0 to 320 do begin { 320 bytes in one line }
  40.       write(txtfile,chars[y,x],',');
  41.       if x mod 10 = 9 then begin writeln(txtfile); write(txtfile,'    '); end;
  42.     end;
  43.     write(txtfile,'),(');
  44.   end;
  45.   writeln(txtfile,')');
  46.  
  47.   close(txtfile);
  48.   repeat until keypressed;
  49. end.
  50.